From e83d13bbbe4a7d19371a5be6782bd592a6ee7406 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sun, 13 Feb 2022 17:27:53 +0100
Subject: fix: switch prism theme on single article

I forgot to change the selector to query all code blocks.
---
 src/pages/article/[slug].tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/pages/article/[slug].tsx')

diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx
index a45cbc9..7bde448 100644
--- a/src/pages/article/[slug].tsx
+++ b/src/pages/article/[slug].tsx
@@ -38,7 +38,7 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => {
 
   useEffect(() => {
     const allPre: NodeListOf<HTMLPreElement> = document.querySelectorAll(
-      'pre[data-prismjs-color-scheme'
+      'pre[data-prismjs-color-scheme-current]'
     );
     setCodeBlocks(allPre);
   }, [setCodeBlocks, router.asPath]);
-- 
cgit v1.2.3

